package com.cq.hd.product.mapper;

import com.cq.hd.product.api.dto.ActiveShareStatisticsDto;
import com.cq.hd.product.api.vo.ActiveAgentShareCountVo;
import com.cq.hd.product.api.vo.ActiveShareRecordVo;
import com.cq.hd.product.api.vo.ActiveShareStatisticsVo;
import com.cq.hd.product.po.TbActiveSharePo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 活动分享记录表 Mapper 接口
 * </p>
 *
 * @author mYunYu
 * @since 2023-11-23
 */
@Mapper
public interface TbActiveShareMapper extends BaseMapper<TbActiveSharePo> {

    ActiveShareRecordVo getByCode(@Param("code") String code, @Param("activeId") Long activeId);

    List<ActiveShareStatisticsVo> listByDto(ActiveShareStatisticsDto activeShareStatisticsDto);

    // 活动经纪人分享次数
    List<ActiveAgentShareCountVo> getAgentShareCountByActiveIds(@Param("activeIds") List<Long> activeIds);

    // 用户分享过的活动id
    List<Long> getUserShareActiveIds(@Param("userId") Long userId, @Param("activeIds") List<Long> activeIds);
}
